# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>

pkgname=patchutils
pkgver=0.3.4
pkgrel=1
pkgdesc="Utilities to work with patches"
arch=('i686' 'x86_64')
url="http://cyberelk.net/tim/software/patchutils/"
license=('GPL')
groups=('base-devel')
depends=('msys2-runtime')
makedepend=('msys2-runtime-devel')
source=(http://cyberelk.net/tim/data/patchutils/stable/${pkgname}-${pkgver}.tar.xz)
sha256sums=('cf55d4db83ead41188f5b6be16f60f6b76a87d5db1c42f5459d596e81dabe876')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}

  autoreconf -fi
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  ./configure \
    --build=${CHOST} \
    --host=${CHOST} \
    --target=${CHOST} \
    --prefix=/usr

  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=$pkgdir install
}
